<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="utf-8">
        <title>

        </title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" th:href="@{/css/x-admin.css}" media="all">
        <link rel="stylesheet" th:href="@{/lib/bootstrap/css/bootstrap.css}" media="all">

    </head>
    <body>
        <div class="x-nav">
            <span class="layui-breadcrumb">
                <cite>首页</cite></a>
                <a><cite>会员管理</cite></a>
                <a><cite>会员删除</cite></a>
            </span>
            <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"  href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:30px">ဂ</i></a>
        </div>
        <div class="x-body">
            <form class="layui-form x-center" th:action="@{/usersList}" method="get" style="width:80%">
                <div class="layui-form-pane" style="margin-top: 15px;">
                    <div class="layui-form-item" style="margin-left: 220px">
                        <label class="layui-form-label">查询</label>
                        <div class="layui-input-inline">
                            <input type="text" th:value="${users.getUname()}" value="" name="uname" placeholder="请输入用户名" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <input class="layui-input" th:value="${users.getUsex()}" name="usex" placeholder="性别" id="LAY_demorange_s">
                        </div>
                        <div class="layui-input-inline">
                            <input class="layui-input" th:value="${users.getUaddress()}" name="uaddress" placeholder="地址" id="LAY_demorange_e">
                        </div>
                        <div class="layui-input-inline" style="width:80px">
                            <button class="layui-btn" type="submit"  lay-submit="" lay-filter="sreach">
                                <i class="layui-icon">&#xe615;</i>
                            </button>
                        </div>
                    </div>
                </div>
            </form>
            <xblock>
                <a th:href="@{/toAddMember}" class="layui-btn" onclick="recoverAll()">
                    <i class="layui-icon">&#xe624;</i>添加用户
                </a>
                <span class="x-right" style="line-height:40px">共有数据：[[${page.getTotal()}]] 条</span>
            </xblock>
            <table class="layui-table">
                <thead>
                    <tr>
                        <!--<th>-->
                        <!--    <input type="checkbox" name="" value="">-->
                        <!--</th>-->
                        <th>ID</th>
                        <th>用户名</th>
                        <th>性别</th>
                        <th>年龄</th>
                        <th>地址</th>
                        <th>QQ</th>
                        <th>邮箱</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr th:each="user:${page.getRecords()}">
                        <!--<td>
                            <input type="checkbox" value="1" name="">
                        </td>-->
                        <td th:text="${user.getId()}"></td>
                        <td th:text="${user.getUname()}"></td>
                        <td th:text="${user.getUsex()}"></td>
                        <td th:text="${user.getUage()}"></td>
                        <td th:text="${user.getUaddress()}"></td>
                        <td th:text="${user.getUqq()}"></td>
                        <td th:text="${user.getUemail()}"></td>
                        <td class="td-manage">
                            <a class="btn btn-primary" th:href="@{/tomemberEdit/{id}(id=${user.getId()})}" role="button">编辑</a>
                            <a class="btn btn-danger" th:href="@{/tomemberDel/{id}(id=${user.getId()},pn=${page.getCurrent()})}" role="button">删除</a>
                        </td>
                    </tr>
                </tbody>
            </table>
            <nav style="width: 264px;height: 34px;margin: 0 0 200px 600px;">
                <ul class="pagination">
                    <li th:class="${page.getCurrent() == 1} ? 'disabled' : ''">
                        <a th:href="${page.getCurrent() == 1} ? 'javascript:;' : @{/usersList(pageNum=${page.getCurrent()-1})}" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>

                    <li th:class="${page.getCurrent() == pageNum ? 'active' : ''}" th:each="pageNum : ${#numbers.sequence(1, page.getPages())}">
                        <a th:href="@{/usersList(pageNum=${pageNum})}">[[${pageNum}]]</a>
                    </li>
                    <li th:class="${page.getCurrent() == page.getPages()} ? 'disabled' : ''">
                        <a th:href="${page.getCurrent() == page.getPages()} ? 'javascript:;' : @{/usersList(pageNum=${page.getCurrent()+1})}" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
                <p>sdfjljasdl</p>
            </nav>
        </div>
        <script src="./lib/layui/layui.js" charset="utf-8"></script>
        <script src="./js/x-layui.js" charset="utf-8"></script>

    </body>
</html>